#include "painterPaths.h"

QPainterPath PainterPaths::cardPath(const QSize& size)
{
  double roundSize(size.height()*0.1);
  QPainterPath path;
  path.moveTo(size.width(), roundSize/2);
  path.arcTo(size.width()-roundSize, 0, roundSize, roundSize, 0, 90);
  path.lineTo(roundSize/2, 0);
  path.arcTo(0, 0, roundSize, roundSize, 90, 90);
  path.lineTo(0, size.height()-roundSize/2);
  path.arcTo(0, size.height()-roundSize, roundSize, roundSize, 180, 90);
  path.lineTo(size.width()-roundSize/2, size.height());
  path.arcTo(size.width()-roundSize, size.height()-roundSize, roundSize, roundSize, 270, 90);
  path.closeSubpath();
  return path;
}
